package com.vic.dubbo.lrucache;

import java.util.concurrent.atomic.AtomicInteger;

public class CacheServiceImpl implements CacheService {
    private AtomicInteger index = new AtomicInteger();

    @Override
    public String getResultByName(String name) {
        Integer callCount = index.getAndIncrement();
        System.out.println("paramter is "+ name +" call time is "+ callCount);
        if(name == null){
            return "hello hero";
        }else if(name.equals("Lyn")){
            return "hello Lyn";
        }else{
            return "hello War3";
        }
    }
}
